package cn.kgc.kongqi.controller;

import cn.kgc.kongqi.pojo.District;
import cn.kgc.kongqi.pojo.ResultEntity;
import cn.kgc.kongqi.service.DistrictService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shkstart
 * @create 2020-05-20 22:46
 */
@RestController
public class DistrictController {

    @Resource
    DistrictService districtService;

    @RequestMapping("/selectAll")
    public ResultEntity<List<District>> selectAll(){
        List<District> districts = districtService.selectAll();
        return ResultEntity.successWithoutData(districts);
    }

}
